package com.vint.basic;

/**
 * Longest increasing subsequence
 */
public class LIS {
	public static void main(String[] args) {

	}

	public int longestIncreasingSubsequence(int[] a) {

		return 0;
	}

	/*
	 * 数组中第一个不小于value的值，并替换
	 */
	public void binarySearchGreater(int[] a, int value, int length) {
		if (length == 1 && a[0] > value) {
			a[0] = value;
			return;
		}
		int mid = a[length/2];
		if (mid == value) {
			return;
		}
		if (mid > value && a[length/2 -1] < value) {
			a[length/2] = value;
			return;
		}
		if (mid < value && a[length/2 + 1] > value) {
			a[length/2 + 1] = value;
			return;
		}

		if (mid > value) {

		} else {

		}
	}
}
